package com.webside.banner.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.webside.banner.mapper.BannerMapper;
import com.webside.banner.model.BannerEntity;
import com.webside.banner.service.BannerService;
import com.webside.base.baseservice.impl.AbstractService;
 
@Service("bannerService")
public class BannerServiceImpl extends AbstractService<BannerEntity, Long> implements BannerService {

	@Autowired
	private BannerMapper bannerMapper;
	// 这句必须要加上。不然会报空指针异常，因为在实际调用的时候不是BaseMapper调用，而是具体的mapper，这里为userMapper
	@Autowired
	public void setBaseMapper() {
		super.setBaseMapper(bannerMapper);
	}
	@Override
	public List<BannerEntity> selectall(BannerEntity banners) {
		// TODO Auto-generated method stub
		return bannerMapper.selectall(banners);
	}
	@Override
	public List<BannerEntity> queryListPartner(Map<String, Object> parameter) {
		// TODO Auto-generated method stub
		return bannerMapper.queryListPartner(parameter);
	}
	@Override
	public BannerEntity findByName(String name) {
		// TODO Auto-generated method stub
		return bannerMapper.findByName(name);
	}
	
 
}
